package com.example.my.meila.view.adapter.beautyadapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.my.meila.constast.Constast;

import java.util.List;

/**
 * Created by My on 2016/10/31.
 */
public class BeautyPageAdapter extends FragmentPagerAdapter {
    private List<Fragment>data;
    public BeautyPageAdapter(FragmentManager fm, List<Fragment>data) {
        super(fm);
        this.data=data;
    }

    @Override
    public Fragment getItem(int position) {
        return data.get(position);
    }

    @Override
    public int getCount() {
        return data.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return Constast.beauty.get(position).getName();
    }
}
